package com.tyk.bookstore.back.order.model.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author tyk
 * @description 订单明细
 */
@Schema(name = "OrderDetail", description = "订单详情")
@TableName("order_detail")
@Data
public class OrderDetailDo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1;

    @Schema(description = "ID")
    @TableId("id")
    private Long id;

    @Schema(description = "订单ID")
    @TableField("order_id")
    private Long orderId;

    @Schema(description = "会员ID")
    @TableField("member_id")
    private Long memberId;

    @Schema(description = "书籍ID")
    @TableField("book_id")
    private Long bookId;

    @Schema(description = "书籍编号")
    @TableField("book_no")
    private String bookNo;

    @Schema(description = "书籍封面")
    @TableField("cover")
    private String cover;

    @Schema(description = "书籍标题")
    @TableField("title")
    private String title;

    @Schema(description = "书籍价格")
    @TableField("price")
    private BigDecimal price;

    @Schema(description = "书籍重量")
    @TableField("weight")
    private Long weight;

    @Schema(description = "购买数量")
    @TableField("num")
    private Integer num;
}
